<template>
  <div class="head-box">
    <span class="head-title" @click="handleToIndex">SANYE</span>
    <van-button
      round
      @click="handleToLibrary"
      icon="http://foglake.sanye666.top/images/icon/type.png"
      size="mini"
      color="#061B41"
      style="width:24px"
    />
  </div>
</template>

<script>
import Taro from "@tarojs/taro";
export default {
  name: "Pagehead",
  props: {
    title: String,
    type: String,
  },
  data() {
    return {};
  },
  methods: {
    handleToLibrary() {
      Taro.navigateTo({
        url: "/pages/library/library",
      });
    },
    handleToIndex(){
      Taro.redirectTo({
        url:"/pages/index/index"
      })
    }
  },
};
</script>

<style scoped>
.head-box {
  background: rgba(245, 248, 252, 1);
  padding: 25.5px 23.5px 7.5px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.head-title {
  font-size: 38px;
  font-family: Alibaba PuHuiTi;
  font-weight: 800;
  color: rgba(6, 27, 65, 0.75);
}
</style>